package com.dingdang.feign;

import com.dingdang.data.Result;
import com.dingdang.dto.OrderDetailsDTO;
import com.dingdang.dto.UserDTO;
import com.dingdang.feign.callback.ReserveFeignCallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@FeignClient(value = "dingdangcar-reserve-service",fallback = ReserveFeignCallBack.class)
public interface ReserveFeign {

    @PostMapping("/reserve")
    public Result createOrder(@RequestBody OrderDetailsDTO orderDetails);

    //不要再postman中调用此方法,支付方法只能在web页面中调用
    @GetMapping("/reserve")
    public String OrderPay(@RequestParam String orderId,
                           @RequestParam(defaultValue = "2000")String orderPrice,
                           @RequestParam(defaultValue = "定金")String ordername,
                           @RequestParam(defaultValue = "无")String orderbody
    );

    
}
